-
Couldn't load subscription status.
- Fork 1.9k
Add an Extension Config API #20837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an Extension Config API #20837
Conversation
This comment has been minimized.
This comment has been minimized.
a3120d8 to
c5893b7
Compare
editors/code/src/config.ts
Outdated
| readonly rootSection = "rust-analyzer"; | ||
| private readonly requiresServerReloadOpts = ["server", "files", "showSyntaxTree"].map( | ||
| private readonly rootSection = "rust-analyzer"; | ||
| private readonly requiresServerReloadOpts = ["cargo", "server", "files", "showSyntaxTree"].map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good catch, that was for an unrelated issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
changelog feat (first contribution) expose an |
Add an Extension Config API
This adds an exported API for other extensions to add rust-analyzer-specific configurations for #18476. It provides a simple API where an extension can just call something like
to configure aspects. The extension configurations are persisted in the workspace, but only configurations from extensions are are actually present are used, so that uninstalled extensions, etc. aren't causing any trouble.
This does pull in lodash as a dependency, but IMO this is neither very heavy nor critical, and it was already in the dev closure anyway.
Also cf. the discussion in https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/VSCode.20extension.20config.20feature.20contribution
Fixes #18476